package com.wicket.okrcomponent.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wicket.okrcomponent.base.service.MOmsConfSchemeOptionResultService;
import com.wicket.okrcomponent.base.service.dto.common.ConfSchemeItemResultDto;
import com.wicket.okrcomponent.base.service.dto.common.OpenConfItemResultDto;
import com.wicket.okrcomponent.base.service.dto.req.*;
import com.wicket.okrcomponent.common.dto.FieldInfo;
import com.wicket.okrcomponent.common.exception.BizException;
import com.wicket.okrcomponent.common.util.CommonFunctionHelper;
import com.wicket.okrcomponent.dal.mapper.mbg.OmsConfSchemeOptionResultMapper;
import com.wicket.okrcomponent.dal.po.mbg.OmsConfSchemeOptionResult;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author ：
 * @since 2022/1/19 15:39
 *
 *
 * @version 1.0
 */
@Service
public class MOmsConfSchemeOptionResultServiceImpl
        extends ServiceImpl<OmsConfSchemeOptionResultMapper, OmsConfSchemeOptionResult>
        implements MOmsConfSchemeOptionResultService {

    @Autowired
    OmsConfSchemeOptionResultMapper omsConfSchemeOptionResultMapper;

    /**
   * 2-3-07查询方案下选项配置结果列表[1940]
   * gen by moon at 10/24/2022, 12:58:36 AM
   */
 @Trace(operationName = "2-3-07查询方案下选项配置结果列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  queryConfItemResultList(QueryConfItemResultListReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("conf_option_sort_num");
queryWrapper.orderByDesc("operate_time");
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }

    /**
   * 2-3-07批量新增方案下选项配置结果[2031]
   * gen by moon at 10/24/2022, 12:58:39 AM
   */
 @Trace(operationName = "2-3-07批量新增方案下选项配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchAddConfItemResult(List<OmsConfSchemeOptionResult> omsConfSchemeOptionResult) {
     
      if(omsConfSchemeOptionResult==null || omsConfSchemeOptionResult.size()==0){
        return false;
      }
      
      return super.saveBatch(omsConfSchemeOptionResult.stream().map(item->{
       item.setOptionResultId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
item.setIsArchive("FALSE");
item.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
item.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
if(item!=null && item.getSubjectLifeCycle()!=null &&  item.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            item.setReleaseInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//RELEASED_CURRENT_INDUCTIONID
          }
item.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
item.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
if(item!=null && item.getSubjectLifeCycle()!=null && item.getSubjectLifeCycle().equals("CURRENTLY_VALID")){
             item.setReleaseTime(CommonFunctionHelper.getCurrentTime());//RELEASE_SYSTEM_CURRENT_TIME
            }
item.setIsValid("FALSE");
item.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
item.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
          return item;
      }).collect(Collectors.toList()));
  }

    /**
   * 2-3-07批量查询方案下选项配置结果By选项关系[1986]
   * gen by moon at 10/24/2022, 12:58:37 AM
   */
 @Trace(operationName = "2-3-07批量查询方案下选项配置结果By选项关系")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryConfItemResultList(BatchQueryConfItemResultListReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getConfSchemeItemResultList()==null || reqDto.getConfSchemeItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_option_rship_id", reqDto.getConfSchemeItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }

    /**
   * 2-3-07批量查分组匹配答案[2320]
   * gen by moon at 10/24/2022, 12:58:47 AM
   */
 @Trace(operationName = "2-3-07批量查分组匹配答案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQuerySchemeClassMatchAnswer(BatchQuerySchemeClassMatchAnswerReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            if(reqDto.getConfSchemeItemResultList()==null || reqDto.getConfSchemeItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_item_code", reqDto.getConfSchemeItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }

    /**
   * 2-3-07查配置项匹配答案详情[2487]
   * gen by moon at 3/30/2023, 12:33:36 PM
   */
 @Trace(operationName = "2-3-07查配置项匹配答案详情")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  OmsConfSchemeOptionResult  queryConfItemMatchAnswerDetail(QueryConfItemMatchAnswerDetailReq reqDto) {
     
        try {
         reqDto.setIsValid("FALSE");
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsConfSchemeOptionResult> retList = super.list(queryWrapper);
            if(retList!=null && retList.size()>0){
                OmsConfSchemeOptionResult retData = retList.get(0);
                
                return retData;
            }
            return null;
      } catch (Exception e) {
          e.printStackTrace();
          throw new BizException("-1",e,false);
      }
  }

    /**
   * 2-3-07查开通方案下选项配置结果列表[2136]
   * gen by moon at 10/24/2022, 12:58:43 AM
   */
 @Trace(operationName = "2-3-07查开通方案下选项配置结果列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  queryOpenConfItemResultList(QueryOpenConfItemResultListReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }

    /**
   * 2-3-07批量修改开通方案下选项配置结果[2131]
   * gen by moon at 10/24/2022, 12:58:42 AM
   */
 @Trace(operationName = "2-3-07批量修改开通方案下选项配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchUpdateOpenConfItemResult(List<OmsConfSchemeOptionResult> omsConfSchemeOptionResult) {
     
      if(omsConfSchemeOptionResult==null || omsConfSchemeOptionResult.size()==0){
        return false;
      }
        return super.saveOrUpdateBatch(omsConfSchemeOptionResult);
      
  }

    /**
   * 2-3-07批量新增开通方案下选项配置结果[2129]
   * gen by moon at 10/24/2022, 12:58:42 AM
   */
 @Trace(operationName = "2-3-07批量新增开通方案下选项配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchAddOpenConfItemResult(List<OmsConfSchemeOptionResult> omsConfSchemeOptionResult) {
     
      if(omsConfSchemeOptionResult==null || omsConfSchemeOptionResult.size()==0){
        return false;
      }
      
      return super.saveBatch(omsConfSchemeOptionResult.stream().map(item->{
       item.setIsArchive("FALSE");
item.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
item.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
if(item!=null && item.getSubjectLifeCycle()!=null &&  item.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            item.setReleaseInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//RELEASED_CURRENT_INDUCTIONID
          }
item.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
item.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
if(item!=null && item.getSubjectLifeCycle()!=null && item.getSubjectLifeCycle().equals("CURRENTLY_VALID")){
             item.setReleaseTime(CommonFunctionHelper.getCurrentTime());//RELEASE_SYSTEM_CURRENT_TIME
            }
item.setIsValid("FALSE");
item.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
item.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
          return item;
      }).collect(Collectors.toList()));
  }

    /**
   * 2-3-07批量修改方案下选项配置结果[2042]
   * gen by moon at 10/24/2022, 12:58:40 AM
   */
 @Trace(operationName = "2-3-07批量修改方案下选项配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchUpdateConfItemResult(List<OmsConfSchemeOptionResult> omsConfSchemeOptionResult) {
     
      if(omsConfSchemeOptionResult==null || omsConfSchemeOptionResult.size()==0){
        return false;
      }
        return super.saveOrUpdateBatch(omsConfSchemeOptionResult);
      
  }

    /**
   * 2-03-07批量删除方案下选项配置结果[1988]
   * gen by moon at 10/24/2022, 12:58:38 AM
   */
 @Trace(operationName = "2-03-07批量删除方案下选项配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchDeleteConfItemResult(List<String> reqDto) {
     
          if(reqDto==null || reqDto.size()==0){
            return false;
          }
          
          return super.removeByIds(reqDto);
  }

    /**
   * 2-3-07批量查询开通方案下选项配置结果列表[2125]
   * gen by moon at 10/24/2022, 12:58:41 AM
   */
 @Trace(operationName = "2-3-07批量查询开通方案下选项配置结果列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryOpenConfItemResultist(BatchQueryOpenConfItemResultistReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            queryWrapper.in("result_asp_obj_id", reqDto.getOpenConfItemResultList().stream().map(OpenConfItemResultDto::getResultAspObjId).collect(Collectors.toList()));
queryWrapper.in("conf_option_rship_id", reqDto.getOpenConfItemResultList().stream().map(OpenConfItemResultDto::getConfOptionRshipId).collect(Collectors.toList()));
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }

    /**
   * 2-3-07查配置项匹配答案列表[2506]
   * gen by moon at 10/24/2022, 12:58:49 AM
   */
 @Trace(operationName = "2-3-07查配置项匹配答案列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  queryConfItemMatchAnswerList(QueryConfItemMatchAnswerListReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("conf_option_sort_num");
queryWrapper.orderByDesc("operate_time");
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }

    /**
   * 2-3-07批量查询方案下选项配置结果[2305]
   * gen by moon at 10/24/2022, 12:58:46 AM
   */
 @Trace(operationName = "2-3-07批量查询方案下选项配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryConfItemResult(BatchQueryConfItemResultReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            if(reqDto.getConfSchemeItemResultList()==null || reqDto.getConfSchemeItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_scheme_id", reqDto.getConfSchemeItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("operate_time");
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }

    /**
   * 2-3-06批量查方案分组下配置答案[2290]
   * gen by moon at 10/24/2022, 12:58:45 AM
   */
 @Trace(operationName = "2-3-06批量查方案分组下配置答案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryConfItemClassResult(BatchQueryConfItemClassResultReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            if(reqDto.getConfSchemeItemResultList()==null || reqDto.getConfSchemeItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_item_code", reqDto.getConfSchemeItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }

    /**
   * 2-3-07批量查By配置方案结果[2283]
   */
 @Trace(operationName = "2-3-07批量查By配置方案结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryByConfSchemeConfItemResult(BatchQueryByConfSchemeConfItemResultReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getConfSchemeItemResultList()==null || reqDto.getConfSchemeItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_scheme_code", reqDto.getConfSchemeItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }

    /**
   * 2-3-07查询方案下选项配置结果详情[1939]
   * gen by moon at 3/30/2023, 12:33:35 PM
   */
 @Trace(operationName = "2-3-07查询方案下选项配置结果详情")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  OmsConfSchemeOptionResult  queryConfItemResultDetail(QueryConfItemResultDetailReq reqDto) {
     
        try {
         reqDto.setIsValid("FALSE");
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsConfSchemeOptionResult> retList = super.list(queryWrapper);
            if(retList!=null && retList.size()>0){
                OmsConfSchemeOptionResult retData = retList.get(0);
                
                return retData;
            }
            return null;
      } catch (Exception e) {
          e.printStackTrace();
          throw new BizException("-1",e,false);
      }
  }

    /**
   * 2-3-07删除方案下选项配置结果[1938]
   * gen by moon at 10/24/2022, 12:58:34 AM
   */
 @Trace(operationName = "2-3-07删除方案下选项配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  deleteConfItemResult(DeleteConfItemResultReq reqDto) {
     reqDto.setSubjectLifeCycle("EDITING");
      try {
          Map<String, Object> columnMap = CommonFunctionHelper.objectToMap(reqDto);
          return super.removeByMap(columnMap);
      } catch (Exception e) {
          e.printStackTrace();
          throw new BizException("-1",e,false);
      }
  }

    /**
   * 2-3-07修改方案下选项配置结果[1937]
   * gen by moon at 10/24/2022, 12:58:33 AM
   */
 @Trace(operationName = "2-3-07修改方案下选项配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  updateConfItemResult(OmsConfSchemeOptionResult omsConfSchemeOptionResult) {
     omsConfSchemeOptionResult.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
if(omsConfSchemeOptionResult!=null && omsConfSchemeOptionResult.getSubjectLifeCycle()!=null &&  omsConfSchemeOptionResult.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            omsConfSchemeOptionResult.setReleaseInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//RELEASED_CURRENT_INDUCTIONID
          }
if(omsConfSchemeOptionResult!=null && omsConfSchemeOptionResult.getSubjectLifeCycle()!=null && omsConfSchemeOptionResult.getSubjectLifeCycle().equals("ARCHIVING")) {
              omsConfSchemeOptionResult.setArchiveInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//ARCHIVE_CURRENT_INDUCTIONID
          }
omsConfSchemeOptionResult.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
if(omsConfSchemeOptionResult!=null && omsConfSchemeOptionResult.getSubjectLifeCycle()!=null && omsConfSchemeOptionResult.getSubjectLifeCycle().equals("CURRENTLY_VALID")){
             omsConfSchemeOptionResult.setReleaseTime(CommonFunctionHelper.getCurrentTime());//RELEASE_SYSTEM_CURRENT_TIME
            }
if(omsConfSchemeOptionResult!=null && omsConfSchemeOptionResult.getSubjectLifeCycle()!=null && omsConfSchemeOptionResult.getSubjectLifeCycle().equals("ARCHIVING")) {
              omsConfSchemeOptionResult.setArchiveTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
          }
        return super.updateById(omsConfSchemeOptionResult);
  }

    /**
   * 2-3-07新增方案下选项配置结果[1936]
   * gen by moon at 10/24/2022, 12:58:32 AM
   */
 @Trace(operationName = "2-3-07新增方案下选项配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  String  addConfItemResult(OmsConfSchemeOptionResult omsConfSchemeOptionResult) {
     omsConfSchemeOptionResult.setOptionResultId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
omsConfSchemeOptionResult.setIsArchive("FALSE");
omsConfSchemeOptionResult.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsConfSchemeOptionResult.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsConfSchemeOptionResult.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
omsConfSchemeOptionResult.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
omsConfSchemeOptionResult.setIsValid("FALSE");
omsConfSchemeOptionResult.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
omsConfSchemeOptionResult.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
     if(super.save(omsConfSchemeOptionResult)){
        return omsConfSchemeOptionResult.getOptionResultId();
     }else {
        return "-1";
     }
    
  }
/**
   * 2-3-07批量查询答案By配置项标识[2283]
   * gen by moon at 10/24/2022, 12:58:44 AM
   */
 @Trace(operationName = "2-3-07批量查询答案By配置项标识")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryByConfItemCodeResult(BatchQueryByConfItemCodeResultReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getConfSchemeItemResultList()==null || reqDto.getConfSchemeItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_item_code", reqDto.getConfSchemeItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 2-3-06批量查询方案下选项配置结果列表ByCodes[3833]
   * gen by moon at 10/24/2022, 12:58:50 AM
   */
 @Trace(operationName = "2-3-06批量查询方案下选项配置结果列表ByCodes")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryConfItemResultListByCodes(BatchQueryConfItemResultListByCodesReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            if(reqDto.getConfItemCodeList()==null || reqDto.getConfItemCodeList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_item_code", reqDto.getConfItemCodeList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByAsc("conf_option_sort_num");
queryWrapper.orderByDesc("operate_time");
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 2-3-07批量查询答案归属对象ID匹配答案[4200]
   * gen by moon at 10/24/2022, 12:58:51 AM
   */
 @Trace(operationName = "2-3-07批量查询答案归属对象ID匹配答案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryresultAspObjIdMatchAnswer(BatchQueryresultAspObjIdMatchAnswerReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            if(reqDto.getConfItemResultList()==null || reqDto.getConfItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("result_asp_obj_id", reqDto.getConfItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 2-3-07批量查询选项标识匹配评价模板方案[4313]
   * gen by moon at 10/24/2022, 12:58:52 AM
   */
 @Trace(operationName = "2-3-07批量查询选项标识匹配评价模板方案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryOptionMatchEvaTempConfScheme(BatchQueryOptionMatchEvaTempConfSchemeReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            if(reqDto.getConfItemResultList()==null || reqDto.getConfItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_option_code", reqDto.getConfItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 2-3-07批量查询业务场景过滤配置方案[4337]
   * gen by moon at 10/24/2022, 12:58:53 AM
   */
 @Trace(operationName = "2-3-07批量查询业务场景过滤配置方案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryBizSceneConfScheme(BatchQueryBizSceneConfSchemeReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            if(reqDto.getBizSceneConfSchemeList()==null || reqDto.getBizSceneConfSchemeList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_scheme_id", reqDto.getBizSceneConfSchemeList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * M2-3-07批量查询配置关系匹配答案[4496]
   * gen by moon at 10/24/2022, 12:58:54 AM
   */
 @Trace(operationName = "M2-3-07批量查询配置关系匹配答案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQuerySetRelationMatchAnswer(BatchQuerySetRelationMatchAnswerReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            if(reqDto.getSetRelationMatchAnswerList()==null || reqDto.getSetRelationMatchAnswerList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("applex_rel_id", reqDto.getSetRelationMatchAnswerList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 2-3-03批量查询配置方案答案[4583]
   * gen by moon at 10/24/2022, 12:58:55 AM
   */
 @Trace(operationName = "2-3-03批量查询配置方案答案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryConfScheme(BatchQueryConfSchemeReq reqDto) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getConfItemResultList()==null || reqDto.getConfItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("result_asp_obj_id", reqDto.getConfItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * M2查询配置答案测试列表[4893]
   * gen by moon at 10/24/2022, 12:58:56 AM
   */
 @Trace(operationName = "M2查询配置答案测试列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  queryConfSchemeOptionResultDataList(OmsConfSchemeOptionResult omsConfSchemeOptionResult) {
     
        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            
            
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(omsConfSchemeOptionResult);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * M2批量删配置答案测试[4894]
   * gen by moon at 10/24/2022, 12:58:57 AM
   */
 @Trace(operationName = "M2批量删配置答案测试")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchDeleteConfSchemeOptionResultData(List<String> reqDto) {
     
          if(reqDto==null || reqDto.size()==0){
            return false;
          }
          
          return super.removeByIds(reqDto);
  }
/**
   * 2-3-07批量改克隆答案[6655]
   * gen by moon at 5/14/2023, 2:43:42 AM
   */
 @Trace(operationName = "2-3-07批量改克隆答案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchUpdateCloneResult(List<OmsConfSchemeOptionResult> omsConfSchemeOptionResult) {

      if(omsConfSchemeOptionResult==null || omsConfSchemeOptionResult.size()==0){
        return false;
      }
        return super.saveOrUpdateBatch(omsConfSchemeOptionResult);

  }
/**
   * 2-3-07新增克隆答案[6656]
   * gen by moon at 5/14/2023, 2:43:43 AM
   */
 @Trace(operationName = "2-3-07新增克隆答案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  String  addCloneResult(OmsConfSchemeOptionResult omsConfSchemeOptionResult) {
     omsConfSchemeOptionResult.setOptionResultId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
omsConfSchemeOptionResult.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
if(omsConfSchemeOptionResult!=null && omsConfSchemeOptionResult.getSubjectLifeCycle()!=null && omsConfSchemeOptionResult.getSubjectLifeCycle().equals("ARCHIVING")) {
              omsConfSchemeOptionResult.setArchiveInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//ARCHIVE_CURRENT_INDUCTIONID
          }
omsConfSchemeOptionResult.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
if(omsConfSchemeOptionResult!=null && omsConfSchemeOptionResult.getSubjectLifeCycle()!=null && omsConfSchemeOptionResult.getSubjectLifeCycle().equals("ARCHIVING")) {
              omsConfSchemeOptionResult.setArchiveTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
          }
omsConfSchemeOptionResult.setIsValid("FALSE");
omsConfSchemeOptionResult.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
     if(super.save(omsConfSchemeOptionResult)){
        return omsConfSchemeOptionResult.getOptionResultId();
     }else {
        return "-1";
     }

  }
/**
   * 2-3-07修改克隆答案[6657]
   * gen by moon at 5/14/2023, 2:43:45 AM
   */
 @Trace(operationName = "2-3-07修改克隆答案")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  updateCloneResult(OmsConfSchemeOptionResult omsConfSchemeOptionResult) {
     omsConfSchemeOptionResult.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsConfSchemeOptionResult.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        return super.updateById(omsConfSchemeOptionResult);
  }
/**
   * 2-3-07批量查询进度加载背景图[7068]
   * gen by moon at 5/31/2023, 11:04:30 PM
   */
 @Trace(operationName = "2-3-07批量查询进度加载背景图")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryProgressLoadingBg(BatchQueryProgressLoadingBgReq reqDto) {

        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getConfItemConfAnswerExtendList()==null || reqDto.getConfItemConfAnswerExtendList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("extension_field1", reqDto.getConfItemConfAnswerExtendList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 2-3-07批量查询配置选项匹配答案列表[7265]
   * gen by moon at 6/27/2023, 1:11:48 PM
   */
 @Trace(operationName = "2-3-07批量查询配置选项匹配答案列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryOptionMatchAnswerListByIds(BatchQueryOptionMatchAnswerListByIdsReq reqDto) {

        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getConfItemResultList()==null || reqDto.getConfItemResultList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("conf_option_code", reqDto.getConfItemResultList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 2-3-07答案值批量查配置结果[9550]
   * gen by moon at 5/11/2024, 11:13:30 PM
   */
 @Trace(operationName = "2-3-07答案值批量查配置结果")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsConfSchemeOptionResult>  batchQueryEndValueBatchConfResult(BatchQueryEndValueBatchConfResultReq reqDto) {

        try {
            QueryWrapper<OmsConfSchemeOptionResult> queryWrapper = new QueryWrapper<>();

            if(reqDto.getConfEndValueList()==null || reqDto.getConfEndValueList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("end_value", reqDto.getConfEndValueList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsConfSchemeOptionResult.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsConfSchemeOptionResult.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsConfSchemeOptionResult>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
}
